// File generated from our OpenAPI spec by Stainless.

package com.metest.api.services.blocking.rest.actuator

import com.google.errorprone.annotations.MustBeClosed
import com.metest.api.core.ClientOptions
import com.metest.api.core.RequestOptions
import com.metest.api.core.http.HttpResponse
import com.metest.api.core.http.HttpResponseFor
import com.metest.api.models.rest.actuator.sbom.SbomRetrieveByIdParams
import com.metest.api.models.rest.actuator.sbom.SbomRetrieveParams
import com.metest.api.models.rest.actuator.sbom.SbomRetrieveResponse
import java.util.function.Consumer

interface SbomService {

    /**
     * Returns a view of this service that provides access to raw HTTP responses for each method.
     */
    fun withRawResponse(): WithRawResponse

    /**
     * Returns a view of this service with the given option modifications applied.
     *
     * The original service is not modified.
     */
    fun withOptions(modifier: Consumer<ClientOptions.Builder>): SbomService

    /** Actuator web endpoint 'sbom' */
    fun retrieve(): SbomRetrieveResponse = retrieve(SbomRetrieveParams.none())

    /** @see retrieve */
    fun retrieve(
        params: SbomRetrieveParams = SbomRetrieveParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ): SbomRetrieveResponse

    /** @see retrieve */
    fun retrieve(params: SbomRetrieveParams = SbomRetrieveParams.none()): SbomRetrieveResponse =
        retrieve(params, RequestOptions.none())

    /** @see retrieve */
    fun retrieve(requestOptions: RequestOptions): SbomRetrieveResponse =
        retrieve(SbomRetrieveParams.none(), requestOptions)

    /** Actuator web endpoint 'sbom-id' */
    @MustBeClosed
    fun retrieveById(id: String): HttpResponse = retrieveById(id, SbomRetrieveByIdParams.none())

    /** @see retrieveById */
    @MustBeClosed
    fun retrieveById(
        id: String,
        params: SbomRetrieveByIdParams = SbomRetrieveByIdParams.none(),
        requestOptions: RequestOptions = RequestOptions.none(),
    ): HttpResponse = retrieveById(params.toBuilder().id(id).build(), requestOptions)

    /** @see retrieveById */
    @MustBeClosed
    fun retrieveById(
        id: String,
        params: SbomRetrieveByIdParams = SbomRetrieveByIdParams.none(),
    ): HttpResponse = retrieveById(id, params, RequestOptions.none())

    /** @see retrieveById */
    @MustBeClosed
    fun retrieveById(
        params: SbomRetrieveByIdParams,
        requestOptions: RequestOptions = RequestOptions.none(),
    ): HttpResponse

    /** @see retrieveById */
    @MustBeClosed
    fun retrieveById(params: SbomRetrieveByIdParams): HttpResponse =
        retrieveById(params, RequestOptions.none())

    /** @see retrieveById */
    @MustBeClosed
    fun retrieveById(id: String, requestOptions: RequestOptions): HttpResponse =
        retrieveById(id, SbomRetrieveByIdParams.none(), requestOptions)

    /** A view of [SbomService] that provides access to raw HTTP responses for each method. */
    interface WithRawResponse {

        /**
         * Returns a view of this service with the given option modifications applied.
         *
         * The original service is not modified.
         */
        fun withOptions(modifier: Consumer<ClientOptions.Builder>): SbomService.WithRawResponse

        /**
         * Returns a raw HTTP response for `get /rest/actuator/sbom`, but is otherwise the same as
         * [SbomService.retrieve].
         */
        @MustBeClosed
        fun retrieve(): HttpResponseFor<SbomRetrieveResponse> = retrieve(SbomRetrieveParams.none())

        /** @see retrieve */
        @MustBeClosed
        fun retrieve(
            params: SbomRetrieveParams = SbomRetrieveParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): HttpResponseFor<SbomRetrieveResponse>

        /** @see retrieve */
        @MustBeClosed
        fun retrieve(
            params: SbomRetrieveParams = SbomRetrieveParams.none()
        ): HttpResponseFor<SbomRetrieveResponse> = retrieve(params, RequestOptions.none())

        /** @see retrieve */
        @MustBeClosed
        fun retrieve(requestOptions: RequestOptions): HttpResponseFor<SbomRetrieveResponse> =
            retrieve(SbomRetrieveParams.none(), requestOptions)

        /**
         * Returns a raw HTTP response for `get /rest/actuator/sbom/{id}`, but is otherwise the same
         * as [SbomService.retrieveById].
         */
        @MustBeClosed
        fun retrieveById(id: String): HttpResponse = retrieveById(id, SbomRetrieveByIdParams.none())

        /** @see retrieveById */
        @MustBeClosed
        fun retrieveById(
            id: String,
            params: SbomRetrieveByIdParams = SbomRetrieveByIdParams.none(),
            requestOptions: RequestOptions = RequestOptions.none(),
        ): HttpResponse = retrieveById(params.toBuilder().id(id).build(), requestOptions)

        /** @see retrieveById */
        @MustBeClosed
        fun retrieveById(
            id: String,
            params: SbomRetrieveByIdParams = SbomRetrieveByIdParams.none(),
        ): HttpResponse = retrieveById(id, params, RequestOptions.none())

        /** @see retrieveById */
        @MustBeClosed
        fun retrieveById(
            params: SbomRetrieveByIdParams,
            requestOptions: RequestOptions = RequestOptions.none(),
        ): HttpResponse

        /** @see retrieveById */
        @MustBeClosed
        fun retrieveById(params: SbomRetrieveByIdParams): HttpResponse =
            retrieveById(params, RequestOptions.none())

        /** @see retrieveById */
        @MustBeClosed
        fun retrieveById(id: String, requestOptions: RequestOptions): HttpResponse =
            retrieveById(id, SbomRetrieveByIdParams.none(), requestOptions)
    }
}
